package com.cxy.datawarehouse.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 用户表
 */
@Data
@Entity
@ApiModel("用户表")
@Table(name = "t_user")
@DynamicInsert
@DynamicUpdate
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @Id
    @ApiModelProperty("主键")
    @Column(name = "id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;


    /**
     * 用户名(登录名)
     */
    @ApiModelProperty("用户名(登录名)")
    @Column(name = "user_name", nullable = false)
    private String userName;

    /**
     * 用户名(昵称)
     */
    @ApiModelProperty("用户名(昵称)")
    @Column(name = "nick_name", nullable = false)
    private String nickName;

    /**
     * 手机号
     */
    @ApiModelProperty("手机号")
    @Column(name = "phone", nullable = false)
    private String phone;

    /**
     * 密码
     */
    @ApiModelProperty("密码")
    @Column(name = "password", nullable = false)
    private String password;
}
